# ~*~ coding: utf-8 ~*~
import redis
import json

redisPool = redis.ConnectionPool(host='127.0.0.1',port=6379,db=1,password='jumpserver')
client = redis.Redis(connection_pool=redisPool)
vfmessage = {
'IP':'10.16.243.152',
'告警项':'客户测试环境',
'自愈项':'ncc.app',
'当前状态':'BAD'
}
vfs = '''IP:10.16.243.152
主机:客户测试环境
告警项目:ncc.app
当前状态:BAD   OK'''
vfs = json.dumps(vfmessage)
client.lpush('icbc',vfs)